package com.ky.pro.java.sharding.ecommerce.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ky.pro.java.sharding.ecommerce.entity.ComOrder;
import com.ky.pro.java.sharding.ecommerce.mapper.ComOrderMapper;
import com.ky.pro.java.sharding.ecommerce.util.ListUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 订单信息表 服务实现类
 * </p>
 *
 * @author Kevin Dummy
 * @since 2021-12-18
 */
@Service
public class ComOrderServiceImpl extends ServiceImpl<ComOrderMapper, ComOrder> implements IService<ComOrder> {

    @Autowired
    ComOrderMapper comOrderMapper;


    public List<ComOrder> findByUserId(Long userId) {
        return comOrderMapper.selectList(new QueryWrapper<ComOrder>()
                .eq("user_id", userId));
    }

}
